package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * sysArea对象 sys_area
 *
 * @author yuanzheng
 * @date 2022-04-07
 */
public class SysArea extends BaseEntity {
    private static final long serialVersionUID = 1L;

    public static final String CACHE_KEY_SYS_AREA = "cache_sysarea:all";
    public static final String CACHE_KEY_SYS_AREA_ID = "cache_sysarea:id";

    public static final String CACHE_KEY_SYS_AREA_PROVINCE_CITY = "cache_sysarea:provinceandcity" ;



    /** 高风险	1 */
    public static final String AREA_RISK_TYPE_HIGH = "1";
    /** 中风险	2 */
    public static final String AREA_RISK_TYPE_MIDDLE = "2";
    /** 其他地区	3 */
    public static final String AREA_RISK_TYPE_OTHER = "3";
    /** 疫情重点地区	4 */
    public static final String AREA_RISK_TYPE_KEY = "4";
    /** 低风险	5 */
    public static final String AREA_RISK_TYPE_LOW = "5";
    /** 风险地区	9 */
    public static final String AREA_RISK_TYPE_RISK = "9";




    // 是否同步修改下级
    private String isDditSon;

    /**
     * 部门ID
     */
    private String deptId;

    /**
     * 父部门ID
     */
    private String parentId;

    /**
     * 祖级列表
     */
    private String ancestors;

    private String provinceName;

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    /**
     * 省市
     */
    private String provinceCity;

    public String getProvinceCity() {
        return this.provinceName+this.deptName;
    }

    public void setProvinceCity(String provinceCity) {
        this.provinceCity = this.provinceName+this.deptName;
    }

    private String sheng;
    private String shi;
    private String xian;

    public String getSheng() {
        return sheng;
    }

    public void setSheng(String sheng) {
        this.sheng = sheng;
    }

    public String getShi() {
        return shi;
    }

    public void setShi(String shi) {
        this.shi = shi;
    }

    public String getXian() {
        return xian;
    }

    public void setXian(String xian) {
        this.xian = xian;
    }

    private String idx;

    public String getIdx() {
        return idx;
    }

    public void setIdx(String idx) {
        this.idx = idx;
    }

    /**
     * 商品名称
     */
    private String deptName;

    /**
     * 显示顺序
     */
    private String orderNum;

    /**
     * 负责人
     */
    private String leader;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 规格明细
     */
    private String email;

    /**
     * 部门状态:0正常,1停用
     */
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /*部门类型*/
    private String type;

    /*部门级别*/
    private String grade;

    /*备注*/
    private String remarks;

    /**
     * 父名称
     */
    private String parentName;

    // 是否有子级
    private Boolean hasChildren;

    /**
     * 子部门
     */
    private List<SysArea> children = new ArrayList<SysArea>();

    //是否质检
    private String riskflag;
    private String riskflags;      //下级
    private String dealtype;     //单位


    private BigDecimal citycode;//吨位重量
    private BigDecimal firstchar;//单价

    private BigDecimal counts;//数量
    private String code ;//存货编码
    private String ismain;//是否自制
    private String iswork;//是否在制
    private BigDecimal tax;//利率
    private BigDecimal taxprice	;//含税价格
    private BigDecimal allmaoney;//含税总价
    private BigDecimal dongjie;//冻结数量
    private BigDecimal shengyu;//剩余数量
    private BigDecimal shengdun;//剩余重量
    private BigDecimal alldun;//总重量

    public BigDecimal getShengdun() {
        return shengdun;
    }

    public void setShengdun(BigDecimal shengdun) {
        this.shengdun = shengdun;
    }

    public BigDecimal getAlldun() {
        return alldun;
    }

    public void setAlldun(BigDecimal alldun) {
        this.alldun = alldun;
    }

    public BigDecimal getDongjie() {
        return dongjie;
    }

    public void setDongjie(BigDecimal dongjie) {
        this.dongjie = dongjie;
    }

    public BigDecimal getShengyu() {
        return shengyu;
    }

    public void setShengyu(BigDecimal shengyu) {
        this.shengyu = shengyu;
    }

    public BigDecimal getCounts() {
        return counts;
    }

    public void setCounts(BigDecimal counts) {
        this.counts = counts;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIsmain() {
        return ismain;
    }

    public void setIsmain(String ismain) {
        this.ismain = ismain;
    }

    public String getIswork() {
        return iswork;
    }

    public void setIswork(String iswork) {
        this.iswork = iswork;
    }

    public BigDecimal getTax() {
        return tax;
    }

    public void setTax(BigDecimal tax) {
        this.tax = tax;
    }

    public BigDecimal getTaxprice() {
        return taxprice;
    }

    public void setTaxprice(BigDecimal taxprice) {
        this.taxprice = taxprice;
    }

    public BigDecimal getAllmaoney() {
        return allmaoney;
    }

    public void setAllmaoney(BigDecimal allmaoney) {
        this.allmaoney = allmaoney;
    }

    public String getRiskflags() {
        return riskflags;
    }

    public void setRiskflags(String riskflags) {
        this.riskflags = riskflags;
    }

    public String getIsDditSon() {
        return isDditSon;
    }

    public void setIsDditSon(String isDditSon) {
        this.isDditSon = isDditSon;
    }

    public String getDealtype() {
        return dealtype;
    }

    public void setDealtype(String dealtype) {
        this.dealtype = dealtype;
    }

    public String getRiskflag() {
        return riskflag;
    }

    public void setRiskflag(String riskflag) {
        this.riskflag = riskflag;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    @NotBlank(message = "部门名称不能为空")
    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    @NotBlank(message = "显示顺序不能为空")
    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getLeader() {
        return leader;
    }

    public void setLeader(String leader) {
        this.leader = leader;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    //@Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 200, message = "规格明细长度不能超过200个字符")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public List<SysArea> getChildren() {
        return children;
    }

    public void setChildren(List<SysArea> children) {
        this.children = children;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Boolean getHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    public BigDecimal getCitycode() {
        return citycode;
    }

    public void setCitycode(BigDecimal citycode) {
        this.citycode = citycode;
    }

    public BigDecimal getFirstchar() {
        return firstchar;
    }

    public void setFirstchar(BigDecimal firstchar) {
        this.firstchar = firstchar;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("deptId", getDeptId())
                .append("parentId", getParentId())
                .append("ancestors", getAncestors())
                .append("deptName", getDeptName())
                .append("orderNum", getOrderNum())
                .append("leader", getLeader())
                .append("phone", getPhone())
                .append("email", getEmail())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("type", getType())
                .append("grade", getGrade())
                .append("remarks", getRemarks())
                .toString();
    }
}
